package com.liyunc.socket.point.ping;

import java.io.IOException;
import java.net.Socket;

public class WebPing {
    public static void main(String[] args) throws IOException {
        Socket socket = null;
        try {
            socket = new Socket("127.0.0.1", 60000);
            System.out.println("连接到：" + socket.isConnected());

        } catch (IOException e) {
            System.out.println("false");
        } finally {
            socket.close();
        }
    }
}
